package com.ksvip.next.components.core.bean;

import java.io.Serializable;

/**
 * 类Event.java的实现描述：被监听事件
 */
public class Event implements Serializable {

    private static final long serialVersionUID = 4161755693819623893L;

    /**
     * bean
     */
    private Object            bean;

    /**
     * 方法名
     */
    private String            methodName;

    /**
     * 参数
     */
    private Object[]          args;

    @SuppressWarnings("rawtypes")
    private Class[]           clazzs;

    /**
     * @param bean
     * @param methodName
     * @param args
     */
    public Event(Object bean, String methodName, Object[] args) {
        this.bean = bean;
        this.methodName = methodName;
        if (args != null) {
            this.args = args.clone();
        }
    }

    /**
     * @param bean
     * @param methodName
     * @param args
     * @param clazzs
     */
    public Event(Object bean, String methodName, Object[] args, @SuppressWarnings("rawtypes") Class[] clazzs) {
        this.bean = bean;
        this.methodName = methodName;
        if (args != null) {
            this.args = args.clone();
        }
        if (clazzs != null) {
            this.clazzs = clazzs.clone();
        }
    }

    /**
     * @return
     */
    public Object getBean() {
        return this.bean;
    }

    /**
     * @param bean
     */
    public void setBean(Object bean) {
        this.bean = bean;
    }

    /**
     * @return
     */
    public String getMethodName() {
        return this.methodName;
    }

    /**
     * @param methodName
     */
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    /**
     * @return
     */
    public Object[] getArgs() {
        return this.args;
    }

    /**
     * @param args
     */
    public void setArgs(Object[] args) {
        if (args != null) {
            this.args = args.clone();
        }
    }

    /**
     * @return
     */
    @SuppressWarnings("rawtypes")
    public Class[] getClazzs() {
        return this.clazzs;
    }

    /**
     * @param clazzs
     */
    @SuppressWarnings("rawtypes")
    public void setClazzs(Class[] clazzs) {
        if (clazzs != null) {
            this.clazzs = clazzs.clone();
        }
    }
}
